﻿{extend name="layout/base" /}

{block name="meta"}
  {__block__}
  <style>
    .price_label {
      font-size: 13px;
      font-weight: 900;
      white-space: nowrap;
      color: #666;
    }
    .shopstr-pr{float:left;width:100%;margin-top:7px;color:#807f7f}

  </style>
{/block}
{block name="body"}
<body class="shop_list_page">
{/block}

{block name="main"}

  <!-- Main Container -->
  <div class="main-container col2-left-layout">
    <div class="container">
      <div class="row">
        <div class="col-main col-sm-9 col-xs-12 col-sm-push-3">

          {if $__FILTERLIST__}
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">
                筛选
              </h3>
            </div>
            <div class="panel-body">
              <div class="tabs-wrapper">
                {mall:pagefilter id="filter" exclude=""}
                <div class="tabs-group">
                  <div class="title">{$filter.title}:</div>
                  <ul class="content clearfix">
                    {volist name="$filter.content" id="item"}
                    <li class="note-style {$item.active?'active':''}"><a href="{$item.url}">{$item.title}</a></li>
                    {/volist}
                  </ul>
                </div>
                {/mall:pagefilter}
                <!-- E 分类列表 -->
              </div>
            </div>
          </div>
          {/if}

          <div class="shop-inner">
            <div class="page-title">
              <h2>{:__("Shop List")}</h2>
            </div>
            <div class="toolbar">
              <div class="view-mode">
                <ul>
                  <li> <a href="{:addon_url('mall/shop/detail',array('ids'=>1))}"> <i class="fa fa-th-large"></i> </a> </li>
                  <li class="active"> <a href="{:addon_url('mall/shop/index')}"> <i class="fa fa-th-list"></i> </a> </li>
                </ul>
              </div>
              <div class="sorter">
                <div class="short-by">
                  <ul class="list-unstyled list-inline category-order clearfix">
                    <!-- S 排序 -->
                    {mall:pageorder id="order"}
                    <li class="{$order.active?'active':''}"><a href="{$order.url}">{$order.title}</a></li>
                    {/mall:pageorder}
                    <!-- E 排序 -->
                  </ul>
                </div>
                <div class="short-by page">
                  <label>{:__("Pagesize")}:</label>
                  <select id="pagesize" name="pagesize" onchange="changeUrlParam(this.options[this.options.selectedIndex].value,this.name)">
                    <option value="5" {if $pagesize == 5}selected{/if}>5</option>
                    <option value="10" {if $pagesize == 10}selected{/if}>10</option>
                    <option value="20" {if $pagesize == 20}selected{/if}>20</option>
                    <option value="50" {if $pagesize == 50}selected{/if}>50</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="product-list-area">
              <ul class="products-list" id="products-list">
                {mall:pagelist id='v1' model="Shop"}
                <li class="item ">
                    <div class="product-img">
                        {if isset($v1['accreds'][0])}
                        <div class="icon-sale-label sale-left">{$v1['accreds'][0]['name']=="消保认证商家"?"消":"七"}</div>
                        {/if}
                        {if isset($v1['accreds'][1])}
                        <div class="icon-new-label new-right">{$v1['accreds'][1]['name']=="消保认证商家"?"消":"七"}</div>
                        {/if}
                        <a href="{:addon_url('mall/shop/detail',array('ids'=>$v1['id']))}">
                            <figure> <img class="small-image" src="{$v1['shopimg']}" alt="{$v1['name']}"></figure>
                        </a>
                    </div>
                    <div class="product-shop">
                      <h2 class="product-name">
                        <a target='_blank' href="{:addon_url('mall/shop/detail',array('ids'=>$v1['id']))}">{:mb_substr($v1['name'],0,12)}</a>
                          <span class="rating-links">
                          {volist name="v1['accreds']" id="v2"}
                          <img style="width:15px;" src="__MALLCDN__{$v2['img']}" title="{$v2['name']}" alt="{$v2['name']}"/>
                          {/volist}
                        </span>
                      </h2>
                      <div class="ratings shopstr-pr language-currency-wrapper">
                        <span class="block block-language form-language" style=" border-left:none">
                            <div class="rating lg-cur">
                              {for start="1" end="6"}
                                {if($i<=$v1['raty']['totalraty5'])}
                                  <i class="fa fa-star"></i>
                                {else/}
                                  <i class="fa fa-star-o"></i>
                                {/if}
                              {/for}
                            </div>
                            <ul class="list-unstyled">
                              <li class="text-center" ><h4>店铺动态评分</h4></li>
                              <li class="">商品评价：<span class="title">{$v1['goodsraty']}</span></li>
                              <li class="">时效评价：<span class="title">{$v1['timeraty']}</span></li>
                              <li class="">服务评价：<span class="title">{$v1['serviceraty']}</span></li>
                            </ul>
                        </span>
                        <span class="rating-links" style="margin:5px 0px 0px 6px;"> <a href="#">{$v1['raty']['users']} 条评价</a></span>
                      </div>

                      <div class="ratings">
                        <p class="special-price">
                          <span class="price_label">店主：</span>
                          <span class="price">{if $v1['nickname']!=''}{$v1['nickname']}{else}{$v1['name']}{/if}</span>
                        </p>
                      </div>

                      <div class="ratings">
                        <p class="special-price">
                          <span class="price_label">电话：</span>
                          <span class="text"> {$v1['shopTel']}</span>
                        </p>
                        <p class="special-price">
                          <span class="price_label"></span>
                          {if condition="$v1['shopQQ'] neq ''"}
                          <span class="price" style="margin-left:3px;">
                              <a href="tencent://message/?uin={$v1['shopQQ']}&Site=QQ交谈&Menu=yes">
                                  <img border="0" src="https://wpa.qq.com/pa?p=1:{$v1['shopQQ']}:7" alt="QQ交谈" width="60" height="25" />
                              </a>
                          </span>
                          {/if}
                        </p>
                        <p class="special-price">
                          <span class="price_label"></span>
                          {if condition="$v1['shopWangWang'] neq ''"}
                          <span class="price">" style="margin-left:3px;">
                            <a target="_blank" href="https://www.taobao.com/webww/ww.php?ver=3&touid={$v1['shopWangWang']}&siteid=cntaobao&status=1&charset=utf-8">
                               <img style='padding-top:2px;' border="0" src="https://amos.alicdn.com/realonline.aw?v=2&uid={$v1['shopWangWang']}&site=cntaobao&s=1&charset=utf-8" alt="和我联系" width="65" height="23"/>
                            </a>
                          </span>
                          {/if}
                        </p>
                      </div>
                      <div class="ratings">
                        <p class="special-price">
                          <span class="price_label">地区：</span>
                          <span class="text">{$v1['areas']}&nbsp;&nbsp;</span>
                        </p>
                      </div>
                      <div class="ratings">
                        <p>
                          <span class="price_label">主营：</span>
                          <span class="text">{$v1['goodscatNames']}</span>
                        </p>
                      </div>
                      <div class="actions">
                        {if ((int)$v1['favorite_id']>0)}
                        <button class="button cart-button" type="button" onclick="cancelFavorite(this,'shop',{$v1['id']},{$v1['favorite_id']})"><i class="fa fa-heart"></i><span>取消关注</span></button>
                        {else}
                        <button class="button cart-button" type="button" onclick="addFavorite(this,'shop',{$v1['id']},0)"><i class="fa fa-heart-o"></i><span>关注店铺</span></button>
                        {/if}
                      </div>
                    </div>
                </li>
                {/mall:pagelist}
              </ul>
            </div>
            <div class="pagination-area ">
              {mall:pageinfo type="full" /}
            </div>
          </div>
        </div>
        <aside class="sidebar col-sm-3 col-xs-12 col-sm-pull-9">
          {include file="layout/sidebar"}
        </aside>
      </div>
    </div>
  </div>
  <!-- Main Container End -->
{/block}
